package com.giscloud.amp.entity.vo;

import cn.hutool.core.date.DateUtil;
import com.giscloud.amp.entity.AmpOrg;

/**
 * @Author:gxd
 * @Description:
 * @Date: 10:43 2018/2/24
 * @Modified By:
 */
public class AmpOrgVO extends AmpOrg {
    private String createdDtDesc;
    private String statusCdDesc;
    private String text;
    private String orgNames;
    private Integer childrenCount;

    public String getCreatedDtDesc() {
        if(super.getCreatedDt() != null){
            return DateUtil.format(super.getCreatedDt(),"yyyy-MM-dd");
        }
        return "";
    }

    public void setCreatedDtDesc(String createdDtDesc) {
        this.createdDtDesc = createdDtDesc;
    }

    public String getStatusCdDesc() {
        //用户状态 1|在用;2|删除;3|离职;4|冻结
        if (getStatusCd().equals(1L)) {
            return "启用";
        } else if (getStatusCd().equals(2L)) {
            return "未启用";
        } else {
            return "未设置";
        }
    }

    public void setStatusCdDesc(String statusCdDesc) {
        this.statusCdDesc = statusCdDesc;
    }

    public String getOrgNames() {
        return orgNames;
    }

    public void setOrgNames(String orgNames) {
        this.orgNames = orgNames;
    }

    public Integer getChildrenCount() {
        return childrenCount;
    }

    public void setChildrenCount(Integer childrenCount) {
        this.childrenCount = childrenCount;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
